import request from '@/utils/request'
// 配置请求的基准URL地址
/**
 *
 * @param {
code	string	非必须		部门编码，同级部门不可重复
introduce	string	非必须		介绍
manager	string	非必须		负责人名称
name	string	非必须		部门名称
pid	string	非必须		父级部门ID} data
 * @returns
 */
export function addDepartment(data) {
  return request.post('/company/department', data)
}
// 查找所有列表
export function getDepartment() {
  return request.get('/company/department')
}

export function changeDepartment(id, data) {
  return request.put('/company/department/' + id, data)
}

export function deleteDepartment(id) {
  return request.delete('/company/department/' + id)
}

export function getOneDepartment(id) {
  return request.get('/company/department/' + id)
}
